home *** CD-ROM | disk | FTP | other *** search
- package Local.External.CMG
- {
- import flash.external.ExternalInterface;
- import flash.net.URLRequest;
- import flash.net.navigateToURL;
- import flash.system.Capabilities;
-
- public class Utilities
- {
-
-
- public function Utilities()
- {
- super();
- }
-
- public static function trim(param1:String) : String
- {
- var _loc2_:* = undefined;
- var _loc3_:* = undefined;
- _loc2_ = 0;
- while(true)
- {
- §§push(param1);
- if(false)
- {
- break;
- }
- if(§§pop().charCodeAt(_loc2_) >= 33)
- {
- §§push(param1);
- break;
- }
- §§push(_loc2_ + 1);
- if(false)
- {
- §§goto(addr43);
- }
- _loc2_ = §§pop();
- }
- addr43:
- _loc3_ = §§pop();
- while(param1.charCodeAt(_loc3_) < 33)
- {
- _loc3_--;
- }
- §§pop().length - 1;
- return param1.substring(_loc2_,_loc3_ + 1);
- }
-
- public static function goToUrl(param1:String) : void
- {
- var url:String;
- var success:Boolean = false;
- if(true)
- {
- url = param1;
- if(true)
- {
- success = false;
- if(true)
- {
- §§push(ExternalInterface.available);
- if(true)
- {
- if(§§pop())
- {
- if(true)
- {
- §§pop();
- §§push(Capabilities.playerType == "External");
- }
- §§push(!§§pop());
- }
- }
- if(§§pop())
- {
- try
- {
- ExternalInterface.call("window.open",url,"win","");
- addr58:
- success = true;
- addr44:
- }
- catch(error:Error)
- {
- }
- catch(error:SecurityError)
- {
- }
- }
- if(success != true)
- {
- navigateToURL(new URLRequest(url),"_BLANK");
- }
- return;
- }
- §§goto(addr44);
- }
- }
- §§goto(addr58);
- }
- }
- }
-